package patern.simpleFactory;

public class SimpleFactory {
    public static Product makeProduct(Class<? extends Product> kind) {
        if (Product1.class.equals(kind)) {
            return new Product1();
        } else if (Product2.class.equals(kind)) {
            return new Product2();
        }
        return null;
    }

}
